<?php

 /**
  * @package JooS
  * @subpackage PHPackager_FS
  */

  require_once "JooS/PHPackager/FS/Entity.php";

  class JooS_PHPackager_FS_Entity_Dir extends JooS_PHPackager_FS_Entity {
    /**
     * @return bool
     */
    public function file_exists() {
      return true;
    }

    /**
     * @return bool
     */
    public function is_dir() {
      return true;
    }

    /**
     * @return bool
     */
    public function is_file() {
      return false;
    }

    /**
     * @return bool
     */
    public function is_readable() {
      $path = $this->getPath();
      return !$this->isVirtual() && file_exists($path) ? is_readable($this->getPath()) : true;
    }

    /**
     * @return bool
     */
    public function is_writable() {
      $path = $this->getPath();
      return !$this->isVirtual() && file_exists($path) ? is_writable($this->getPath()) : true;
    }
  }
